using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class ICBillTypeMap : EntityTypeConfiguration<ICBillType>
    {
        public ICBillTypeMap()
        {
            // Primary Key
            this.HasKey(t => t.FID);

            // Properties
            this.Property(t => t.FID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FNumber)
                .IsRequired()
                .HasMaxLength(80);

            this.Property(t => t.FName)
                .IsRequired()
                .HasMaxLength(80);

            this.Property(t => t.FNote)
                .IsRequired()
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("ICBillType");
            this.Property(t => t.FID).HasColumnName("FID");
            this.Property(t => t.FNumber).HasColumnName("FNumber");
            this.Property(t => t.FName).HasColumnName("FName");
            this.Property(t => t.FAcctID).HasColumnName("FAcctID");
            this.Property(t => t.FNote).HasColumnName("FNote");
            this.Property(t => t.FSystemic).HasColumnName("FSystemic");
        }
    }
}
